package com.dh.cb;

import java.io.IOException;

public class Simulator {
    public static void main(String[] args) {
        //启动生产者
        new Thread(()->{
            MessageProducer producer = new MessageProducer();
            producer.start();
        }).start();


        //启动消费者
        new Thread(()->{
            MessageConsumer consumer = new MessageConsumer();
            consumer.start();
        }).start();
        try {
            System.in.read();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
